package com.zjs.jsp.domain.jsp;

import lombok.Data;
import org.springframework.data.annotation.Id;

/**
 * 异常订单
 *
 * @author 李文
 * @create 2017-09-01 19:48
 **/
@Data
public class Jsp_ExceptionOrder
{
    @Id
    private String id;


    /**
     * 客户UUID
     */
    private String uuid;

    /**
     * 异常状态
     *          1  解析 客户订单 MQ 数据异常
     *          2  获取配置信息
     *          3  创建新的任务包保存数据 异常
     *          4  下发数据转换JSon 异常
     *          5  下发 发送MQ 异常
     *          6  下发成功 修改数据库状态
     *          7  和包方法出错
     *          8  超出容错次数
     *          9  追加订单异常  运行创建新任务逻辑
     *          10  未知异常
     */
    private Integer state;


    /**
     * 异常信息
     */
    private String exMessage;

    /**
     * 异常订单数据
     */
    private Jsp_Order order;


    /**
     * 数据
     */
    private String data;

    public Jsp_ExceptionOrder() {
    }

    public Jsp_ExceptionOrder(String exMessage, String data, Integer state) {
        this.exMessage = exMessage;
        this.data = data;
        this.state = state;
    }

    public Jsp_ExceptionOrder(String uuid, Integer state, String exMessage, Jsp_Order order) {

        this.uuid = uuid;
        this.state = state;
        this.exMessage = exMessage;
        this.order = order;
    }

    public Jsp_ExceptionOrder(Integer state, Jsp_Order order, String exMessage) {
        this.state = state;
        this.exMessage = exMessage;
        this.order = order;
        this.uuid = order.getOuuid();
    }
}
